load("//tools:defaults.bzl", "angular_jasmine_test", "copy_to_bin", "js_library", "ng_web_test_suite", "ts_project")

copy_to_bin(
    name = "static_assets",
    srcs = [
        "browser/static_assets/200.html",
        "static_assets/test.html",
    ],
    visibility = [
        "//packages/platform-browser-dynamic/test:__subpackages__",
    ],
)

ts_project(
    name = "test_lib",
    testonly = True,
    srcs = glob(["**/*.ts"]),
    deps = [
        "//:node_modules/rxjs",
        "//:node_modules/zone.js",
        "//packages:types",
        "//packages/animations",
        "//packages/animations/browser",
        "//packages/animations/browser/testing",
        "//packages/common",
        "//packages/common/http",
        "//packages/common/http/testing",
        "//packages/compiler",
        "//packages/core",
        "//packages/core/testing",
        "//packages/platform-browser",
        "//packages/platform-browser/animations",
        "//packages/platform-browser/testing",
        "//packages/private/testing",
    ],
)

js_library(
    name = "zone_event_unpatched_init_lib",
    srcs = ["dom/events/zone_event_unpatched.init.mjs"],
)

angular_jasmine_test(
    name = "test",
    data = [
        ":test_lib",
    ],
)

ng_web_test_suite(
    name = "test_web",
    bootstrap = [
        ":zone_event_unpatched_init_lib",
    ],
    data = [
        ":static_assets",
    ],
    deps = [
        ":test_lib",
    ],
)
